package com.jingzhun.schedule;

import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.util.Date;

/**
 * @author wangDan
 * @data 2019/7/17 0017 19:26
 */
public class MyJob implements Job {
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        JobDataMap jdMap=jobExecutionContext.getJobDetail().getJobDataMap();
        System.out.println(jdMap.get("user"));
        // 输出系统当前时间
        System.out.println(new Date() + ": "+jdMap.get("user")+" doing something...");
    }
}